package com.starblink.library.widget.product.util

import com.starblink.android.basic.sensorsdata.spm.cfg.SpmPageDef
import com.starblink.library.widget.product.ProductCardScene

/**
 *  Create by yuanl at 2023/5/10
 **/
class TrackUtil private constructor(){

    companion object {

        /**
         *  场景转换成页面埋点
         */
        @JvmStatic
        fun transformPageValue(scene: ProductCardScene?) = when (scene) {
            ProductCardScene.HOME -> SpmPageDef.Home080Page_10164
            ProductCardScene.SEARCH -> SpmPageDef.SearchGoodsPage
            ProductCardScene.SEARCH_RECOMMEND -> SpmPageDef.SearchGoodsForuPage
            ProductCardScene.IMAGE_SEARCH -> SpmPageDef.GdsAndPostItemTab
            ProductCardScene.IMAGE_SEARCH_RECOMMEND -> SpmPageDef.GoodsForuTabPage
            ProductCardScene.CATEGORY_MAIN -> SpmPageDef.CATEGORY_MAIN_GOODS_PAGE
            ProductCardScene.FIND_SIMILAR -> SpmPageDef.FIND_SIMILAR_PAGE
            ProductCardScene.WISH_LIST -> SpmPageDef.WishListRoute
            ProductCardScene.CATEGORY_GOODS -> SpmPageDef.CategoryGoodsPage
            else -> 0
        }
    }

}